import {ProductDetailComponent} from './product-detail/product-detail.component';
import {RouterModule, Routes} from '@angular/router';
import {HomeComponent} from './home/home.component';
import {ErrorComponent} from './error/error.component';
import {ProductParamComponent} from './product-param/product-param.component';


const routes: Routes = [
  {path: '', component: HomeComponent},
  {path: 'product', component: ProductDetailComponent},
  {path: 'product/:id', component: ProductParamComponent},
  {path: '**', component: ErrorComponent}
];

export const AppRouting = RouterModule.forRoot(routes);
